import {
  createWebHistory,
  createRouter,
  createWebHashHistory,
} from "vue-router";
import { basicRoutes } from "./routes";
import { IsDevelopment } from "@/utils/configure";

// app router
export const router = createRouter({
  history: IsDevelopment ? createWebHistory() : createWebHashHistory(),
  routes: basicRoutes,
  strict: true,
  scrollBehavior: () => ({ left: 0, top: 0 }),
});

export function setupRouter(app) {
  app.use(router);
}
